import { use } from 'echarts/core';
import { CanvasRenderer } from 'echarts/renderers';
import { LineChart } from 'echarts/charts';
import {
    GridComponent,
    TooltipComponent,
    TitleComponent,
    ToolboxComponent,
    LegendComponent,
    DataZoomComponent,
} from 'echarts/components';

export const loadECharts = () => {
    use([
        TitleComponent,
        TooltipComponent,
        GridComponent,
        ToolboxComponent,
        LegendComponent,
        CanvasRenderer,
        LineChart,
        DataZoomComponent,
    ]);
};
